package com.itheima.exception;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.servlet.ModelAndView;

public class MysException {
    @ExceptionHandler(Exception.class)
    public ModelAndView findAll(){
        ModelAndView modelAndView =new ModelAndView();
        modelAndView.addObject("error_msg","服务器走丢了......");
        modelAndView.setViewName("error");
        return modelAndView;
    }
}
